<?php
$user = PFactory::getUser();
?>

<div id="topmenu" class="" style="padding:0 30px 0 10px;">
   <a href="/index.php/" class="pull-left logo"><img src="<?php echo OC_Helper::linkTo("themes/jobs/core/img", "logo_medium.png"); ?>"/></a>
   
   <ul class="pull-left index_nav_ul">
      <li><a href="/index.php/">首页</a></li>
      <li class="introproduct"><a href="/helps/doc/product/introproduct.html">产品介绍</a></li>
      <li><a href="http://blog.<?=PUtil::serverDomain()?>/">公司动态</a></li>
      <li class="aboutus"><a href="/helps/doc/product/aboutus.html">关于枇杷派</a></li>
   </ul>
   <ul class="user_area pull-right">
<?php if(OC_User::isLoggedIn()):?>
   <li>
      <a class="user_name" href="/index.php/"><?php echo $user->name; ?></a>
   </li>
   <li>
      <a class="user_name" href="<?php echo OC_Helper::linkToRoute("company_logout");?>">退出</a>
   </li>
<?php else: ?>
   <li>
      <a class="user_name" href="<?php echo OC_Helper::linkToRoute("company_registers");?>">注册</a>
   </li>
   <li>
      <a class="user_name" href="<?php echo OC_Helper::linkToRoute("company_login");?>">登录</a>
   </li>
<?php endif; ?>
   </ul>
</div>

<script type="text/javascript">
$(document).ready(function () {
   var url = window.parent.location.href;
   var strurl = url.substring(url.lastIndexOf("/") + 1, url.lastIndexOf("."));
   $(".index_nav_ul li."+strurl).addClass("cur_navli");
   if(strurl == "aboutus" || strurl == "introproduct") {
      $("#topmenu").addClass("container");
      if ($.browser.msie) {
         if($.browser.version == "8.0") {
            $("#topmenu").css("width","940px");
         }
      }
   }
});
</script>